<script setup>
import { onMounted } from 'vue'
import { getAppTitle } from './utils/env'
import EnvInfo from './components/EnvInfo.vue'

// 设置文档标题
onMounted(() => {
  document.title = getAppTitle()
})
</script>

<template>
  <router-view />
  <EnvInfo />
</template>

<style>
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
}

#app {
  height: 100%;
}

/* 全局覆盖Element Plus按钮样式 */
.el-button--primary {
  --el-button-bg-color: var(--primary-color, #1C1D29) !important;
  --el-button-border-color: var(--primary-color, #1C1D29) !important;
  --el-button-hover-bg-color: var(--primary-hover-color, #2d2e3d) !important;
  --el-button-hover-border-color: var(--primary-hover-color, #2d2e3d) !important;
  --el-button-disabled-bg-color: var(--primary-disabled-color, #A2A6B8) !important;
  --el-button-disabled-border-color: var(--primary-disabled-color, #A2A6B8) !important;
}

/* 确保其他Element Plus组件也使用主题色 */
:root {
  --el-color-primary: var(--primary-color, #0C63FA) !important;
  --el-color-primary-light-5: var(--primary-color, #0C63FA) !important;
  --el-text-color-disabled: var(--primary-color, #0C63FA) !important;
  --el-button-bg-color: #1c1d29;
  --el-input-text-color: #1c1d29;
}
</style>
